﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace nMongo
{
    /// <summary>
    /// Represents an attribute for a MongoDB collection class
    /// </summary>
    [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
    public sealed class MongoCollectionAttribute : Attribute
    {
        readonly string _collectionName;

        /// <param name="collectionName">Name of the collection in the MongoDB database.</param>
        public MongoCollectionAttribute(string collectionName)
        { }

        /// <summary>
        /// Name of the collection in the MongoDB database.
        /// </summary>
        public string CollectionName
        {
            get { return _collectionName; }
        }

        public string[] ReferencedBy { get; set; }
    }
}
